# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: tobias <tobias@archlinux.org>
# Contributor: Tobias Kieslich <tobias@justdreams.de>

pkgname=perl-event-execflow
_realname=Event-ExecFlow
pkgver=0.64
pkgrel=8
pkgdesc="Framework for perl-events"
arch=('any')
license=('PerlArtistic')
url="https://www.exit1.org/${_realname}/"
depends=('perl-anyevent' 'perl-libintl-perl' 'perl>=5.10.0')
options=('!emptydirs')
source=(https://search.cpan.org/CPAN/authors/id/J/JR/JRED/${_realname}-${pkgver}.tar.gz)
sha256sums=('c4e9f4e764216efa5e2b9efe90a6582b81cb8aed4c138b4bad747ed3bd16b7bf')

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  # install module in vendor directories.
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make test
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make install DESTDIR="${pkgdir}/"

  # remove perllocal.pod and .packlist
  find "${pkgdir}" -name perllocal.pod -delete
  find "${pkgdir}" -name .packlist -delete
}
